﻿using System.ComponentModel;

namespace Maltose.MessageQueue
{
    /// <summary>
    /// 交换类型
    /// </summary>
    public enum ExchangePublishType
    {
        /// <summary>
        /// 明确的路由规则：消费端绑定的队列名称必须和消息发布时指定的路由名称一致
        /// </summary>
        [Description("direct")]
        Direct,

        /// <summary>
        /// 模式匹配的路由规则：支持通配符
        /// </summary>
        [Description("topic")]
        Topic,

        /// <summary>
        /// 消息广播，将消息分发到exchange上绑定的所有队列上
        /// </summary>
        [Description("fanout")]
        Fanout
    }

    /// <summary>
    /// 订阅类型
    /// </summary>
    public enum ExchangeSubscibeType
    {
        /// <summary>
        /// 明确的路由规则：消费端绑定的队列名称必须和消息发布时指定的路由名称一致
        /// </summary>
        [Description("direct")]
        Direct,

        /// <summary>
        /// 模式匹配的路由规则：支持通配符
        /// </summary>
        [Description("topic")]
        Topic,

        /// <summary>
        /// 消息广播，将消息分发到exchange上绑定的所有队列上
        /// </summary>
        [Description("fanout")]
        Fanout,

        /// <summary>
        /// 延迟类型 基于 rabbitmq_delayed_message_exchange 插件
        /// </summary>
        [Description("x-delayed-message")]
        XDelayedMessage
    }

}
